//package com.yuan.gateway.config;
//
//import com.yuan.gateway.filter.JwtAuthenticationFilter;
//import org.springframework.cloud.gateway.route.RouteLocator;
//import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class GatewayConfig {
//
//    @Bean
//    public RouteLocator routes(RouteLocatorBuilder builder, JwtAuthenticationFilter jwtFilter) {
//        return builder.routes()
//                .route("auth_route", r -> r.path("/login")
//                        .uri("lb://auth-module"))
//                .route("order_route", r -> r.path("/orders/**")
//                        .filters(f -> f.filter(jwtFilter))
//                        .uri("lb://order-module"))
//                .build();
//    }
//}
